//
//  TBScanCodePsrInfosRequest.m
//  AESOLAR_IOS
//
//  Created by Bin Tang on 2025/4/11.
//  Copyright © 2025 Mr.Wang. All rights reserved.
//

#import "TBScanCodePsrInfosRequest.h"
#import "AE_Solar-Swift.h"

@interface TBScanCodePsrInfosRequest ()
@property (nonatomic, copy) NSString *barcode;
@end

@implementation TBScanCodePsrInfosRequest

- (instancetype)initWithBarcode:(NSString *)barcode {
    if (self = [super init]) {
        self.barcode = barcode;
    }
    return self;
}

- (NSString *)requestUrl {
    return @"photovoltaic/psr-info/tempList";
}

- (TYZRequestMethod)requestMethod {
    return TYZRequestMethodPOST;
}

- (id)requestArgument {
    NSDictionary *params = @{@"barcode":self.barcode};
    NSString *json = [params yy_modelToJSONString];
    NSString *aesStr = [AESCrypt AES128Encrypt:json key:[AEUserCommonInfo getAesKey]];
    return @{@"requestData": aesStr};
}

- (Class)rspClass {
    return [TBScanCodePsrInfoModel class];
}
//
//- (Class)recordsRspClass {
//    return [AENewsInfoModel class];;
//}

@end
